Skip to content

feat(agent): monitor open PRs and wire into decision packs - #72

Merged
JSONbored merged 11 commits into
JSONbored:mainfrom
monsterdavidliu-ux:feat/36-contributor-open-pr-monitor
Jun 1, 2026
Merged

feat(agent): monitor open PRs and wire into decision packs#72
JSONbored merged 11 commits into
JSONbored:mainfrom
monsterdavidliu-ux:feat/36-contributor-open-pr-monitor

Conversation

@monsterdavidliu-ux

@monsterdavidliu-ux monsterdavidliu-ux commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add buildContributorOpenPrMonitor to classify a contributor's open PRs on registered repos (approved, failing checks, needs author, duplicate-prone, missing tests, maintainer lane, stale/withdraw, etc.) and return public-safe next-step packets from cached metadata only.
  • Expose the monitor via GET /v1/contributors/{login}/open-pr-monitor and MCP tool gittensory_monitor_open_prs, with session-actor access protection matching private decision-pack routes.
  • Embed openPrMonitor in contributor decision packs and agent planning (summary, next actions, orchestrator context) so the feature is not only a standalone route/tool.
  • Resolve preview.ts merge with main: keep pendingScenarioObserved / afterApprovedPrsMerge / afterStalePrsClose pending-merge scenario behavior.

Review feedback addressed

  • Merge conflict in src/scoring/preview.ts resolved against main.
  • Open-PR monitor wired into decision packs and agent orchestrator.
  • requireContributorAccess on REST and MCP contributor monitor paths.
  • Pending-merge score preview behavior preserved from main.
  • CI branch coverage restored (≥95%).

Test plan

  • PATH=/usr/bin:/bin:$PATH npm run test:ci (≥95% global branch coverage)
  • Approved, failing checks, changes requested, stale, duplicate-prone, maintainer-authored, and empty-monitor scenarios
  • Public output checked for forbidden wallet/hotkey/reward language
  • Decision pack includes openPrMonitor and agent planning consumes it
  • Session cannot read another contributor's open-pr-monitor (REST + MCP)

Fixes #36

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@monsterdavidliu-ux the feature direction is useful, but it still needs integration and conflict cleanup.

Required:

  • Resolve the real merge conflict in src/scoring/preview.ts.
  • Wire open-PR monitor output into decision packs and agent planning, not only a standalone route/tool.
  • Add session-actor access protection for contributor-specific monitor data, matching the private advisory access pattern.
  • Preserve the pending-merge scenario behavior and rerun full validation.

Add contributor open-PR monitor across registered repos with public-safe
classifications, cleanup-first guidance, and pending-merge projections.

- REST GET /v1/contributors/{login}/open-pr-monitor and MCP gittensory_monitor_open_prs
- Session-actor access protection matching private decision-pack routes
- Embed openPrMonitor in contributor decision packs and agent planning actions
- Resolve preview.ts merge with main pending-pr scenario fields

Fixes JSONbored#36
@monsterdavidliu-ux
monsterdavidliu-ux force-pushed the feat/36-contributor-open-pr-monitor branch from a3fc2d8 to d6a3f63 Compare May 31, 2026 13:26
@monsterdavidliu-ux monsterdavidliu-ux changed the title feat(agent): monitor open PRs and generate next-step packets feat(agent): monitor open PRs and wire into decision packs May 31, 2026
monsterdavidliu-ux and others added 8 commits May 31, 2026 13:34
Cover agent orchestrator monitor actions, decision-pack guidance merge,
REST session access, MCP contributor guard, and rate-limit route class.
node:sqlite prepared statements lack columns(); derive column order from
row keys instead. Add a regression test for empty raw() results.
Cover agent context snapshot freshness warnings and regenerate the UI
OpenAPI spec after open-pr-monitor schema changes.
@monsterdavidliu-ux
monsterdavidliu-ux force-pushed the feat/36-contributor-open-pr-monitor branch from a792517 to 71dbed7 Compare June 1, 2026 14:36
@JSONbored
JSONbored self-requested a review June 1, 2026 17:51

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@monsterdavidliu-ux This is ready from my side on the current refresh. The open-PR monitor is wired into scoring scenarios, decision packs, agent orchestration, API, MCP, OpenAPI, and tests, and the active-vs-historical PR distinction is explicit enough for the reviewability/scoring model. Current checks are green and the merge tree is clean.

@dosubot dosubot Bot added the lgtm label Jun 1, 2026
@JSONbored
JSONbored merged commit e8a5ea2 into JSONbored:main Jun 1, 2026
3 checks passed
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(agent): monitor existing PRs and generate next-step packets

2 participants